package parts5.lesson68;

import com.sun.org.apache.xerces.internal.impl.xpath.regex.Match;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Demo2 {

    public static void main(String[] args) {
        String str="100";
        String regex="\\d+";
        Pattern pat=Pattern.compile(regex);
        Matcher mat=pat.matcher(str);
        //返回boolean
        System.out.println(mat.matches());
    }
}
